<html>
	<head>
		<link type="text/css" rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.min.css') }}" />
	<script type='text/javascript' src="{{ url_for('static',filename='js/jquery-3.2.1.min.js') }}"></script>
	<script type='text/javascript' src="{{ url_for('static',filename='js/bootstrap.min.js')}}"></script>
		<title>{% block title %}{% endblock %}</title>
	</head>

	<body>

		<nav class="navbar navbar-default navbar-static-top">
			<div class="navbar-header">
				<a class="navbar-brand" href="{{ url_for('index') }}">签到</a>
			</div>
			<div class="nav navbar-nav ">
				<a class="navbar-brand" href="{{ url_for('list') }}">列表</a>
			</div>
			<ul class="nav navbar-nav ">
				{% if session['username'] %}
				<li>
					<div class="navbar-brand">{{ session['username'] }}</div>
				</li>
				<li>
					<div class="navbar-nav">
						<a class="navbar-brand" href="{{ url_for('logout') }}">登出</a>
					</div>
				</li>
				{% else %}
				<li>
					<a href="{{ url_for('login') }}">登陆</a>
				</li>
				{% endif %}
			</ul>
		</nav>

		{% with messages = get_flashed_messages() %}
		{% for message in messages %}
		<div class='container'>
		<div class="alert alert-warning alert-dismissible" role="alert">
			<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			<strong>{{ message }}</strong><br>
		</div>
		</div>
		{% endfor %}
		{% endwith %}
		<div class='container'>
			{% block body %}
			{% endblock %}
		</div>
		<footer class="footer ">
			<div class="container center" >
				Copyright (c) 2017  Power By : uncle-lu.
					<dr>
					<dr>
			</div>
		</footer>
	</body>

</html>
